import { ControlPproperty } from '../types/formCard';

const AllControlProperty: { [key: string]: ControlPproperty } = {
  // 卡片编码
  cardCode: {
    name: '卡片编码',
    key: 'cardCode',
    defaultValue: '',
    value: null,
    uiType: 'InputControl',
    disabled: true,
    pos: 1,
  },
  displayName: {
    name: '卡片名称',
    key: 'displayName',
    defaultValue: '',
    value: null,
    uiType: 'InputControl',
    pos: 10,
  },
  displayRule: {
    name: '隐藏条件',
    key: 'displayRule',
    defaultValue: '',
    value: null,
    uiType: 'FormulaControl',
    pos: 20,
  },
  ctlValue: {
    name: '默认值',
    key: 'ctlValue',
    defaultValue: '',
    value: null,
    uiType: 'InputControl', // 后期改为表达式编辑器
    pos: 30,
  },
  dataFormat: {
    name: '格式',
    key: 'dataFormat',
    defaultValue: '',
    value: null,
    uiType: 'SelectControl',
    pos: 40,
  },
  // repeatFormat: {
  //   name: '重复校验',
  //   key: 'repeatFormat',
  //   defaultValue: '',
  //   value: null,
  //   uiType: 'SwitchControl',
  //   pos: 50,
  // },
  rows: {
    name: '可见行数',
    key: 'rows',
    defaultValue: '',
    value: null,
    uiType: 'InputNumberControl',
    pos: 60,
  },
  defaultItem: {
    name: '选项',
    key: 'defaultItem',
    defaultValue: [],
    value: null,
    uiType: 'SelectControl',
    pos: 70,
  },
  mobileShowMode: {
    name: '移动端显示模式',
    key: 'mobileShowMode',
    defaultValue: '',
    value: null,
    uiType: 'SelectControl',
    pos: 80,
  },
  fileMaxSize: {
    name: '文件限制大小',
    key: 'fileMaxSize',
    defaultValue: '',
    value: null,
    uiType: 'SelectControl',
    pos: 90,
  },
  mapRange: {
    name: '位置范围',
    key: 'mapRange',
    defaultValue: '',
    value: null,
    uiType: 'SelectControl',
    pos: 100,
  },
  unitSelectionRange: {
    name: '仅以下人员或部门可选择',
    key: 'unitSelectionRange',
    defaultValue: '',
    value: null,
    uiType: 'UserSelectControl',
    pos: 110,
  },
  isAllowRead: {
    name: '允许卡片所选人员查看数据',
    key: 'isAllowRead',
    defaultValue: '',
    value: null,
    uiType: 'SwitchControl',
    pos: 120,
  },
  alignType: {
    name: '对齐方式',
    key: 'alignType',
    defaultValue: '',
    value: null,
    uiType: 'RadioGroupControl',
    pos: 130,
  },
  layoutType: {
    name: '布局',
    key: 'layoutType',
    defaultValue: 'twoCols',
    value: null,
    uiType: 'RadioGroupControl',
    pos: 140,
  },
  layoutPercent: {
    name: '占比',
    key: 'layoutPercent',
    defaultValue: 'twoCols1',
    value: null,
    uiType: 'LayoutPercentControl',
    pos: 150,
  },
  tabTitile: {
    name: '标签页名称',
    key: 'tabTitile',
    defaultValue: '',
    value: null,
    uiType: 'TiledListControl',
    pos: 160,
  },
  associateFormCode: {
    name: '关联表单',
    key: 'associateFormCode',
    defaultValue: '',
    value: null,
    uiType: 'TreeSelectControl',
    pos: 170,
  },
  dataFilter: {
    name: '数据范围限定',
    key: 'dataFilter',
    defaultValue: '',
    value: null,
    uiType: 'EditorControl',
    pos: 180,
  },
  dataFillRule: {
    name: '数据填充规则',
    key: 'dataFillRule',
    defaultValue: '',
    value: null,
    uiType: 'DataFillRuleControl',
    pos: 190,
  },
  associateField: {
    name: '显示字段',
    key: 'associateField',
    defaultValue: '',
    value: null,
    uiType: 'AssociateFieldControl',
    pos: 200,
  },
  calcFormulaRule: {
    name: '计算公式',
    key: 'calcFormulaRule',
    defaultValue: '',
    value: null,
    uiType: 'FormulaControl',
    pos: 210,
  },
  calcFormulaType: {
    name: '类型',
    key: 'calcFormulaType',
    defaultValue: '',
    value: null,
    uiType: 'SelectControl',
    pos: 220,
  },
  buttonExtend: {
    name: '扩展配置',
    key: 'buttonExtend',
    defaultValue: '',
    value: null,
    uiType: 'ButtonExtendControl',
    pos: 230,
  },
  controlSize: {
    name: '卡片大小',
    key: 'controlSize',
    defaultValue: '',
    value: null,
    uiType: 'InputControl',
    pos: 240,
  },
  serviceInfo: {
    name: '调用服务',
    key: 'serviceInfo',
    defaultValue: '',
    value: null,
    uiType: 'ServiceInfoControl',
    pos: 250,
  },
  dataFillConfig: {
    name: '数据填充配置',
    key: 'dataFillConfig',
    defaultValue: '',
    value: null,
    uiType: 'DataFillConfigControl',
    pos: 260,
  },
  startEsignConfig: {
    name: '发起签署配置',
    key: 'startEsignConfig',
    defaultValue: '',
    value: null,
    uiType: 'SwitchControl',
    pos: 270,
  },
  syncEsignConfig: {
    name: '同步签署信息配置',
    key: 'syncEsignConfig',
    defaultValue: '',
    value: null,
    uiType: 'SwitchControl',
    pos: 280,
  },
  placeHolder: {
    name: '提示语',
    key: 'placeHolder',
    defaultValue: '',
    value: null,
    uiType: 'InputControl',
    pos: 500,
  },
  description: {
    name: '描述',
    key: 'description',
    defaultValue: '',
    value: null,
    uiType: 'TextareaControl',
    pos: 510,
  },

  // 表单属性
  schemaCode: {
    name: '表单编码',
    key: 'schemaCode',
    defaultValue: '',
    value: null,
    uiType: 'InputControl',
    disabled: true,
    pos: 10000,
  },
  schemaName: {
    name: '表单名称',
    key: 'schemaName',
    defaultValue: '',
    value: null,
    uiType: 'InputControl',
    pos: 10010,
  },
  // formGroup: {
  //   name: '所属分组',
  //   key: 'formGroup',
  //   defaultValue: '',
  //   value: null,
  //   uiType: 'SelectControl',
  //   pos: 10020,
  // },
  schemaIcon: {
    name: '图标',
    key: 'schemaIcon',
    defaultValue: '',
    value: null,
    uiType: 'SelecTiledtListControl',
    pos: 10030,
  },
  dataTitle: {
    name: '数据标题',
    key: 'dataTitle',
    defaultValue: '',
    value: null,
    uiType: 'MultiSelectControl',
    pos: 10040,
  },
  userReadScope: {
    name: '数据查看权限',
    key: 'userReadScope',
    defaultValue: '',
    value: null,
    uiType: 'SelectControl',
    pos: 10050,
  },
  isShowComment: {
    name: '表单评论',
    key: 'isShowComment',
    defaultValue: '',
    value: null,
    uiType: 'SwitchControl',
    pos: 10060,
  },
  isShowTaskNotice: {
    name: '任务提醒',
    key: 'isShowTaskNotice',
    defaultValue: '',
    value: null,
    uiType: 'SwitchControl',
    pos: 10070,
  },
  isShowActionLog: {
    name: '操作日志',
    key: 'isShowActionLog',
    defaultValue: '',
    value: null,
    uiType: 'SwitchControl',
    pos: 10080,
  },
  displaySetting: {
    name: '显示设置',
    key: 'schemaCode',
    defaultValue: '',
    value: null,
    uiType: 'SwitchListControl',
    pos: 10090,
  },

  // 节点属性
  nodeId: {
    name: '节点编码',
    key: 'nodeId',
    defaultValue: '',
    value: null,
    uiType: 'InputControl',
    disabled: true,
    pos: 20000,
  },
  nodeName: {
    name: '节点名称',
    key: 'nodeName',
    defaultValue: '',
    value: null,
    uiType: 'InputControl',
    pos: 20010,
  },
  actionHandler: {
    name: '经办人',
    key: 'actionHandler',
    defaultValue: [],
    value: null,
    uiType: 'ActionHandlerControl',
    pos: 20020,
  },
  actionAuth: {
    name: '操作权限 ',
    key: 'actionAuth',
    defaultValue: {},
    value: null,
    uiType: 'ActionAuthControl',
    prompt:
      '所有字段均未设置可写时，之前节点已参与过经办的人员在此节点会自动跳过，不再参与',
    pos: 20030,
  },
  actionBtn: {
    name: '功能按钮',
    key: 'actionBtn',
    defaultValue: {},
    value: null,
    uiType: 'ActionBtnControl',
    pos: 20040,
  },
  actionOrder: {
    name: '节点处理人为多人时，业务处理顺序',
    key: 'actionOrder',
    defaultValue: 'same',
    value: null,
    uiType: 'SelectControl',
    pos: 20050,
  },
  turnRule: {
    name: '节点流转规则',
    key: 'turnRule',
    defaultValue: {},
    value: null,
    uiType: 'TurnRuleControl',
    pos: 20060,
  },
  handlerEmpty: {
    name: '找不到处理人时',
    key: 'handlerEmpty',
    defaultValue: 'admin',
    value: null,
    uiType: 'SelectControl',
    pos: 20070,
  },
  messageNotice: {
    name: '节点消息通知',
    key: 'messageNotice',
    defaultValue: {},
    value: null,
    uiType: 'MessageNoticeControl',
    prompt: '可定义流程流转到节点时，经办人接收到的消息内容',
    pos: 20080,
  },
  handlerTime: {
    name: '审批限时',
    key: 'handlerTime',
    defaultValue: {},
    value: null,
    uiType: 'HandlerTimeControl',
    prompt: '可限定经办人处理时间及超时处理方式',
    pos: 20090,
  },

  // 流程属性
  sign: {
    name: '手写签名',
    key: 'sign',
    defaultValue: '',
    value: null,
    uiType: 'SwitchListControl',
    pos: 30000,
  },
};
export default AllControlProperty;
